package com.yinhai.message.core.bpo;


import java.util.List;

import com.yinhai.message.api.bean.TMAppMessage;
import com.yinhai.message.api.vo.TMMessageVo;
import com.yinhai.message.core.po.MessageDetailPo;
import com.yinhai.message.core.po.MessageFilePo;
import com.yinhai.message.core.po.MessagePo;
import com.yinhai.message.manage.msgmg.vo.MessageDetailVo;

/**
 * @author yanglq 2017.3.24
 */
public interface IMessageBpo {

    void addMessage(TMMessageVo amqVo);

    void addMessage(MessagePo po);

    void addMessageState(MessageDetailPo po);

    void modifyMessageSate(MessageDetailPo po);

    void modifyMessageSateBatch(List<MessageDetailPo> poList);
    
    /**
     * 根据 messageId查询 message的详细信息
     * @param messageId
     * @return
     */
    List<MessageDetailVo> queryMessageDetailsByMsgId(String messageId);
    /**
     * 根据msgid 查询messsage的附件信息
     * @param msgid
     * @return
     */
    List<MessageFilePo> queryMessageFileByMsgid(String msgid);
    
    /**
     * 消息vo 存储
     * @param vo
     * @return
     */
    String saveMessage(TMMessageVo vo) throws Exception;
    
    void batchSaveFile(List<MessageFilePo> filePoList);
    
    /**
     * 查询发送失败的消息
     * @return
     */
    List<TMMessageVo> queryErrorMessageDetails();
    /**
     * 修改重发次数和重发状态
     * @param po
     */
    void modifyErrorMessageDetail(List<MessageDetailPo> poList);
    
    /**
     * 存储参保人员app消息
     * @param appMessage
     */
    void addAppMessage(TMAppMessage appMessage,String aac001s);
}
